package net.haiyue.api.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.haiyue.api.custom.JsonResult;
import net.haiyue.api.entity.Event;
import net.haiyue.api.entity.viewModel.EventViewModel4Request;
import net.haiyue.api.service.EventService;
import net.haiyue.api.service.ReportService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@Api(value = "EventController")
@RestController
@RequestMapping(value = "/report")
public class ReportController {
    private Logger logger = LoggerFactory.getLogger(getClass());
    @Resource
    private ReportService _service;
    @Autowired
    HttpServletRequest request;

    @ApiOperation(value="获取所有的录入信息", notes="用于表格展示")
    @PostMapping("/index")
    public JsonResult Index(@RequestBody EventViewModel4Request param){
        return JsonResult.success( _service.all(param));
    }
    @ApiOperation(value="获取所有的录入信息", notes="用于表格展示")
    @PostMapping("/detail")
    public JsonResult detail(@RequestBody EventViewModel4Request param){
        return JsonResult.success( _service.detail(param));
    }
}
